package com.train.mgr.modules.biz.dto.request;

import com.train.mgr.modules.system.dto.request.groups.Insert;
import com.train.mgr.modules.system.dto.request.groups.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;

@Data
public class LessonReqDTO {

    @ApiModelProperty(name = "id", value = "id编辑时必填")
    @NotNull(message = "主键ID必填", groups = {Update.class})
    private Long id;

    @ApiModelProperty(name = "courseId", value = "课程ID必填")
    @NotNull(message = "课程ID必填", groups = {Insert.class})
    private Long courseId;

    @ApiModelProperty(name = "courseName", value = "课时名称，新增/编辑时必填",required = true)
    @NotBlank(message = "课时名称必填", groups = {Insert.class, Update.class})
    @Length(max = 20, message = "课时名称必须在{max}个字以内", groups = {Insert.class, Update.class})
    private String lessonName;

    @ApiModelProperty(name = "salesMethods", value = "销售方式必填")
    private String salesMethods;

    @ApiModelProperty(name = "salesLanguage", value = "销售话术必填（以json格式给到后端API，举例:{'F':'产品特征是','A':'优势是..',......}），注意是双引号")
    private Map<String, String> salesLanguage;

    @ApiModelProperty(name = "keywords", value = "关键字必填")
    private String keywords;

    @ApiModelProperty(name = "practiceProject", value = "练习项目（以多个逗号隔开方式给到后端API，举例当选中3个时（102-话术跟读、103-脱稿演练、104-模拟对话），接口字段值:102,103,104")
    private String practiceProject;

    @ApiModelProperty(name = "roleSelectList", value = "角色设定选择列表对象，举例:[11111,2222,3333]")
    private List<Long> roleSelectList;

    @ApiModelProperty(name = "studyFiles", value = "学习附件:举例(/uploadfile/20251001/mp3/1.mp3,/uploadfile/20251001/doc/2.doc)")
    private String studyFiles;

    @ApiModelProperty(name = "passingScore", value = "通关及及格(以json格式给到后端API,举例:{'102':'60','103':'60','104':'60'})，注意是双引号,其中：102-话术跟读、103-脱稿演练、104-模拟对话")
    private Map<String, String> passingScore;

}
